home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / www-talk.9301-9306.Z / www-talk.9301-9306 / text0575.txt < prev    next >
Encoding:
Text File  |  1995-04-24  |  3.6 KB  |  73 lines

  1. >I could easily write a robot which would roam around the Web (perhaps
  2. >stochastically?), and verify the html, using sgmls.  Then, whenever
  3. >I come across something that's non-compliant, I could automatically
  4. >send mail to wwwmaster@sitename.  No one would have to annoy anyone else
  5. >about whether or not they've verified their HTML; a program would annoy
  6. >them automatically.
  7.  
  8. I have written a robot that does this, except it doesn't check for
  9. valid SGML -- it just tries to map out the entire web.  I believe I
  10. found roughly 50 or 60 different sites (this was maybe 2 months ago --
  11. I'm sorry, I didn't save the output).  It took the robot about half a
  12. day (a saturday morning) to complete.
  13.  
  14. There were several problems.
  15.  
  16. First, some sites were down and my robot would spend a considerable
  17. time waiting for the connection to time out each time it found a link
  18. to such a site.  I ended up remembering the last error from a site and
  19. skipping sites that were obviously down, but there are many different
  20. errors you can get, depending on whether the host is down,
  21. unreachable, doesn't run a WWW server, doesn't recognize the document
  22. address you want, or has some other trouble (some sites were going up
  23. and down while my robot was running, causing additional confusion).
  24.  
  25. Next, more importantly, some sites have an infinite number of
  26. documents.  There are several causes for this.
  27.  
  28. First, several sites have gateways to the entire VMS documentation (I
  29. have never used VMS but apparently the VMS help system is a kind of
  30. hypertext).  While not exactly infinite the number of nodes is *very*
  31. large.  Luckily such gateways are easily recognized by the kind of
  32. pathname they use, and VMS help is unlikely to contain pointers to
  33. anything except more VMS help, so I put in a simple trap to stop
  34. these.
  35.  
  36. Next, there are other gateways.  I can't remember whether I
  37. encountered a Gopher or WAIS gateway, but these would have even worse
  38. problems.
  39.  
  40. Finally, some servers contain bugs that cause loops, by referencing to
  41. the same document with an ever-growing path.  (The relative path
  42. resolving rules are tricky, and I was using my own www client which
  43. isn't derived from Tim's, which made this more severe, but I have also
  44. found occurrences reproducible  with the CERN www client.)
  45.  
  46. Although I didn't specifically test for bad HTML, I did have to parse
  47. the HTML to find the links, and found occasional errors.  I believe
  48. there are a few binaries, PostScript and WP files that have links to
  49. them, which take forever to fetch.  There were also various
  50. occurrences of broken addresses here and there -- this was a good
  51. occasion for me to debug my www client library.
  52.  
  53. If people are interested, I could run the robot again and report a
  54. summary of the results.
  55.  
  56. I also ran a gopher robot, but after 1600 sites I gave up...  The
  57. Veronica project in the Gopher world does the same and makes the
  58. results available as a database, although the last time I tried it the
  59. veronica server seemed too overloaded to respond to a simple query.
  60.  
  61. If you want source for the robots, the're part of the Python source
  62. distribution: ftp to ftp.cwi.nl, directory, pub/python, file
  63. python0.9.8.tar.Z.  The robot (and in fact my entire www and gopher
  64. client library) is in the tar archive in directory python/demo/www.
  65. The texinfo to html conversion program that I once advertized here is
  66. also there.  (I'm sorry, you'll have to built the python interpreter
  67. from the source before any of these programs can be used...)
  68. Note that my www library isn't up with the latest HTML specs, this is
  69. a hobby project and I neede my time for other things...
  70.  
  71. --Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
  72.  
  73.